<!--
========================================================================
 *  Copyright by KNIME AG, Zurich, Switzerland
 *  Website: http://www.knime.com; Email: contact@knime.com
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License, Version 3, as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, see <http://www.gnu.org/licenses>.
 *
 *  Additional permission under GNU GPL version 3 section 7:
 *
 *  KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs.
 *  Hence, KNIME and ECLIPSE are both independent programs and are not
 *  derived from each other. Should, however, the interpretation of the
 *  GNU GPL Version 3 ("License") under any applicable laws result in
 *  KNIME and ECLIPSE being a combined program, KNIME AG herewith grants
 *  you the additional permission to use and propagate KNIME together with
 *  ECLIPSE with only the license terms in place for ECLIPSE applying to
 *  ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the
 *  license terms of ECLIPSE themselves allow for the respective use and
 *  propagation of ECLIPSE together with KNIME.
 *
 *  Additional permission relating to nodes for KNIME that extend the Node
 *  Extension (and in particular that are based on subclasses of NodeModel,
 *  NodeDialog, and NodeView) and that only interoperate with KNIME through
 *  standard APIs ("Nodes"):
 *  Nodes are deemed to be separate and independent programs and to not be
 *  covered works.  Notwithstanding anything to the contrary in the
 *  License, the License does not apply to Nodes, you are not required to
 *  license Nodes under the License, and you are granted a license to
 *  prepare and propagate Nodes, in each case even if such Nodes are
 *  propagated with or for interoperation with KNIME.  The owner of a Node
 *  may freely choose the license terms applicable to such Node, including
 *  when such Node is propagated with or for interoperation with KNIME.
====================================================================
-->
<body>
	Provides functionality for nodes that want to launch external programs.<br />
	The {@link org.knime.base.node.util.exttool.CommandExecution CommandExecution}
	can be used	to run the external program. It will pick up its output (to 
	standard out and to standard error out), log it to the log file, and keep 
	the last 500 lines in two buffers. It will try to destroy the process if the
	user cancels (through the execution context). And it will return the exit 
	code from the external program.<br />
	The two views provided display a text field and react to 
	{@link org.knime.base.node.util.exttool.ViewUpdateNotice ViewUpdateNotice}
	events. One is meant to display output to standard error, the other to 
	standard output.<br />
	The provided NodeModel is meant to clue it all together, and here is how:
	Create your own NodeModel by extending  
	{@link org.knime.base.node.util.exttool.ExtToolOutputNodeModel ExtToolOutputNodeModel}.
	In the execute method use the 
	{@link org.knime.base.node.util.exttool.CommandExecution CommandExecution}
	to execute the external program. Register your NodeModel as Observer with it,
	to see the output in the views during execution (addObserver). 
	Provide the execution context you get 
	in the parameter list. If the execution succeeds (and returns with an OK exit
	code) save the output through the #setExternalOutput(LinkedList<String>) and
	#setExternalErrorOutput(LinkedList<String>) methods. You get the output from
	the CommandExecution object.
	If the execution throws an Exception, or exists with an error exit code, 
	save the output with the methods #setFailedExternalOutput(LinkedList<String>) and
	#setFailedExternalErrorOutput(LinkedList<String>).
	The NodeModel takes care of saving and loading these buffers when the workflow
	is saved/loaded (don't forget to call the super implementation if you override
	the save/load internals methods).<br />
	To provide views to display the output, in your 
	{@link org.knime.core.node.NodeFactory NodeFactory} create instances of
	{@link org.knime.base.node.util.exttool.ExtToolStdoutNodeView ExtToolStdoutNodeView}
	(for a view of the output to standard out) and/or
	 {@link org.knime.base.node.util.exttool.ExtToolStderrNodeView ExtToolStderrNodeView}
	(for a view of the output to standard error).
</body>
